// src/router/index.js
import { createRouter, createWebHistory } from 'vue-router'
import Login from '@/views/Login.vue'
import Register from '@/views/Register.vue'

const routes = [
  { path: '/', redirect: '/login' }, // 默认跳转到登录页
  { path: '/login', name: 'Login', component: Login },
  { path: '/register', name: 'Register', component: Register }
  // 后续可添加：{ path: '/dashboard', component: Dashboard }
]

const router = createRouter({
  history: createWebHistory(), // 使用 HTML5 History 模式（URL 无 #）
  routes
})

export default router
